
package dieci.hibernate;

import dieci.database.PersistentObject;

/**
 *
 * @author DuckSys
 */
public class HibSaleDetailId implements PersistentObject{

    private Long saleId;
    private Long productId;

    public HibSaleDetailId()
    {
    }

    public HibSaleDetailId(Long saleId, Long productId)
    {
        this.saleId = saleId;
        this.productId = productId;
    }
        
    
    /**
     * Get the value of saleId
     *
     * @return the value of saleId
     */
    public Long getSaleId()
    {
        return saleId;
    }

    /**
     * Set the value of saleId
     *
     * @param saleId new value of saleId
     */
    public void setSaleId(Long saleId)
    {
        this.saleId = saleId;
    }

    public Long getProductId()
    {
        return productId;
    }

    public void setProductId(Long productId)
    {
        this.productId = productId;
    }

    
    @Override
    public boolean equals (Object obj)
    {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof HibSaleDetailId))
            return false;
        final HibSaleDetailId other = (HibSaleDetailId) obj;
        if (!this.getSaleId().equals(other.getSaleId()))
            return false;
        if (!this.getProductId().equals(other.getProductId()))
            return false;
        return true;
    }

    @Override
    public int hashCode ()
    {
        int hash = 7;
        hash = 61 * hash + (int) (this.getSaleId() ^ (this.getSaleId() >>> 32));
        hash = 61 * hash + (int) (this.getProductId().hashCode() ^ (this.getProductId().hashCode() >>> 31));
        return hash;
    }

}
